<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="shop_board.db.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%
	//System.out.println(request.getAttribute("listcount")+" "+request.getAttribute("page")+" "+request.getAttribute("maxpage")+" " +request.getAttribute("startpage")+" "+request.getAttribute("endpage"));

	List boardList = null;
	int listcount = 1;
	int nowpage = 1;
	int maxpage = 1;
	int startpage = 1;
	int endpage = 1;

	if (request.getAttribute("listcount") == null) {
		response.sendRedirect("./Main_BoardList.sh");
	} else {
		boardList = (List) request.getAttribute("boardlist");
		listcount = ((Integer) request.getAttribute("listcount"))
				.intValue();
		nowpage = ((Integer) request.getAttribute("page")).intValue();
		maxpage = ((Integer) request.getAttribute("maxpage"))
				.intValue();
		startpage = ((Integer) request.getAttribute("startpage"))
				.intValue();
		endpage = ((Integer) request.getAttribute("endpage"))
				.intValue();
%>


<%
	int pageSize = 8;
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

		String pageNum = request.getParameter("pageNum");
		if (pageNum == null) {
			pageNum = "1";
		}

		int currentPage = Integer.parseInt(pageNum);
		int startRow = (currentPage - 1) * pageSize + 1;
		int endRow = currentPage * pageSize;
		int count = 0;
		List photolist = null;
%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>shopping your dream</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet"
	href="http://www.blueb.co.kr/SRC/javascript/package/lightbox203/css/lightbox.css"
	type="text/css" media="screen" />

<script language="javascript" type="text/javascript"
	SRC="../js/harvest.js">
</script>

<script
	src="http://www.blueb.co.kr/SRC/javascript/package/lightbox203/js/prototype.js"
	type="text/javascript"></script>
<script
	src="http://www.blueb.co.kr/SRC/javascript/package/lightbox203/js/scriptaculous.js?load=effects"
	type="text/javascript"></script>
<script
	src="http://www.blueb.co.kr/SRC/javascript/package/lightbox203/js/lightbox.js"
	type="text/javascript"></script>

<style type="text/css">
body {
	color: #333;
	font: 13px 'Lucida Grande', Verdana, sans-serif;
}
</style>

</head>
<body>
<div id="logo-wrap">
<div id="logo">
<h1><a href="index.jsp">Shop </a></h1>
<h2>Design your dream</h2>
</div>
<div>
<ul>
	<li id="search">
	<form method="get" action="">
	<fieldset><input type="text" id="s" name="s" value="" /> <input
		type="submit" id="x" value="Search" /></fieldset>
	</form>
	</li>
</ul>
</div>
</div>
<!-- start header -->
<div id="header">
<div id="menu">
<ul id="tabSubmenu">
	<li><a href="index.jsp">SHOP</a>
	<ul>
		<li><a href="../web/admin/shop_shop/list.jsp">top</a></li>
		<li><a href="../web/admin/shop_shop/list_pants.jsp">pants</a></li>
		<li><a href="../web/admin/shop_shop/list_onepice.jsp">onepiece</a></li>
		<li><a href="#">out</a></li>
		<li><a href="#">skirt</a></li>
		<li><a href="#">bag</a></li>
		<li><a href="#">etc</a></li>
	</ul>
	</li>
	<li><a href="index.jsp">TO OFFER</a>
	<ul>
		<li><a href="../web/admin/shop_offer/list.jsp">trend</a></li>
		<li><a href="../web/admin/shop_offer/list.jsp">style</a></li>
	</ul>
	</li>
	<!-- 
	
	
	<li><a href="#">COMMUNITY</a>
	
	<ul>
		<li><a href="./board/qna_board_list.jsp">패션제안</a></li>
		<li><a href="./board/hot_girl_list.jsp">Hot girl</a></li>
	</ul>
	</li>
	-->
</ul>

<ul>
	<li><a href="../qna/indexMain.jsp">Q & A</a></li>
	<li><a href="#">MYPAGE</a></li>
	<li><a href="#">CART</a></li>
	<li class="current_page_item"><a href="../login.jsp"> 
	<%
 	String sessionId = (String) session.getAttribute("shop_id");
 		if (sessionId == null) {
 %> LOG IN <%
 	} else {
 %> <%=sessionId%> LOG OUT <%
 	}
 %> </a></li>
	<li class="last"><a href="../join.jsp"> <%
 	if (sessionId == null) {
 %> JOIN US <%
 	} else {
 %> <%
 	}
 %> </a></li>
</ul>
</div>
</div>
<!-- end header -->
<!-- start page -->
<div id="wrapper">
<div id="wrapper-btm">
<div id="page"><!-- start content -->
<div id="content">
<div id="banner"></div>
<div class="post">
<h1 class="title" align="center">pick up</h1>
<div class="entry">
<p>
<div id="imageFlow">
<div class="top"></div>
<div class="bank"><a href="C:/image/2010-07-19 17;27;24.jpg"
	title="벚꽃" target="">1</a> <a href="C:/image/2010-07-19 17;27;37.jpg"
	title="치즈케익">2</a> <a href="C:/image/2010-07-19 17;27;47.jpg"
	title="한강유람선">3</a> <a href="C:/image/2010-07-19 17;27;55.jpg"
	title="New life">4</a> <a href="C:/image/2010-07-19 17;28;02.jpg"
	title="BMW M5">5</a> <a href="C:/image/2010-07-19 17;28;10.jpg"
	title="Empathy">6</a> <a href="C:/image/2010-07-19 17;28;21.jpg"
	title="Much work">7</a></div>
<div class="text">
<div class="title">Loading</div>
<div class="legend">Please wait...</div>
</div>
<div class="scrollbar"><img class="track" src="" alt=""> <img
	class="arrow-left" src="" alt=""> <img class="arrow-right" src=""
	alt=""> <img class="bar" src="" alt=""></div>
</div>
</p>
</div>
<div class="meta">
</div>
<div id=>
<table align="center">
	<tr>
		<td><a href="C:/image/2010-07-19 17;27;47.jpg"
			rel="lightbox[roadtrip]"><img
			src="C:/image/2010-07-19 17;27;47.jpg" width=100 border=0></a> <a
			href="C:/image/2010-07-19 17;28;10.jpg" rel="lightbox[roadtrip]"><img
			src="C:/image/2010-07-19 17;28;10.jpg" width=100 border=0></a> <a
			href="C:/image/2010-07-19 17;27;24.jpg" rel="lightbox[roadtrip]"><img
			src="C:/image/2010-07-19 17;27;24.jpg" width=100 border=0></a> <a
			href="C:/image/2010-07-19 17;27;47.jpg" rel="lightbox[roadtrip]"><img
			src="C:/image/2010-07-19 17;27;47.jpg" width=100 border=0></a> <a
			href="C:/image/2010-07-19 17;28;10.jpg" rel="lightbox[roadtrip]"><img
			src="C:/image/2010-07-19 17;28;10.jpg" width=100 border=0></a> <a
			href="C:/image/2010-07-19 17;27;55.jpg" rel="lightbox[roadtrip]"><img
			src="C:/image/2010-07-19 17;27;55.jpg" width=100 border=0></a> <a
			href="C:/image/2010-07-19 17;28;02.jpg" rel="lightbox[roadtrip]"><img
			src="C:/image/2010-07-19 17;28;02.jpg" width=100 border=0></a></td>
	</tr>
</table>
</div>
</div>
</div>
<div id="sidebar"><!-- end sidebar -->
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end page --></div>
</div>
<!-- start footer -->
<div id="footer">
 <!-- 여기는 shop 이미지부분--> <%
 	for (int i = 0; i < boardList.size(); i++) {
 			BoardBean bl = (BoardBean) boardList.get(i);
 			if (i == 10) {
				break;
			}
 			
 %>

<td align="left">
<a href=./BoardDetailAction.sh?Product_num=<%=bl.getProduct_num()%>&pageNum=<%=currentPage%>>
<div id="shop" >
<img src="C:\shopdesign\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\shopping mall8_5\boardupload\<%=bl.getBoard_file()%>" width="192" height="244"/><%=bl.getTitle()%></div></td>
<a href="./BoardDetailAction.do&pageNum=<%=currentPage%>"> </a>
<td style="font-family: Tahoma; font-size: 10pt;">
<div id="shopallow">
<%
	if (bl.getNum() != 0) {
%> <%
 	for (int a = 0; a <= bl.getNum() * 2; a++) {
 %> &nbsp; <%
 	}
 %>
▶ <%
 	} else {
 %> ▶ <%
 	}
 %> <a
	href="./BoardDetailAction.sh?Product_num=<%=bl.getProduct_num()%>"> </a></div>
</td>
<%
	if (i == 4) {
%>
<tr>
	<td height="9"></td>
</tr>
<%
	}
		}
%> <%
 	}
 %> <%
 	int count = 0;
 	int pageSize = 8;

 	String pageNum = request.getParameter("pageNum");
 	if (pageNum == null) {
 		pageNum = "1";
 	}
 	int currentPage = Integer.parseInt(pageNum);
 	if (count > 0) {
 		int pageCount = count / pageSize
 				+ (count % pageSize == 0 ? 0 : 1);

 		int startPage = (int) (currentPage / 10) * 10 + 1;
 		int pageBlock = 10;
 		int endPage = startPage + pageBlock - 1;
 		if (endPage > pageCount)
 			endPage = pageCount;

 		if (startPage > 10) {
 %> <a
	href="kPhotoList.jsp?pageNum=<%=startPage - 10%>"><img
	src="../img/btn/before_btn.gif" /></a> <%
 	}
 		for (int i = startPage; i <= endPage; i++) {
 %> <a
	href="kPhotoList.jsp?pageNum=<%=i%>"><%=i%></a> <%
 	}
 		if (endPage < pageCount) {
 %> <a
	href="kPhotoList.jsp?pageNum=<%=startPage + 10%>"><img
	src="../img/btn/next_btn.gif" /></a> <%
 	}
 	}
 
   
 %>
<div id="footer-wrap">
</div>
</div>
</div>
<!-- end footer -->
</body>
</html>